﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using DBUtility;

namespace TierApplication
{
    public partial class T_ORDERDETAIL
    {
        public DataSet GetOrderByWhere(string strWhere)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append(" select a.*,b.productname ");
            strSql.Append(", (select codename from c_lifetime t where b.lifetime=t.codeid) timeName");
            strSql.Append(", (select codename from c_bandwidth t where b.bandwidth=t.codeid) bandName");
            strSql.Append("  FROM t_orderdetail a,t_product b ");
            strSql.Append(" where a.productid=b.productid ");

            if (strWhere.Trim() != "")
            {
                strSql.Append(strWhere);
            }
            return DbHelperOra.Query(strSql.ToString());
        }
    }
}
